package org.dydl.common.util;

public class LoginUtil {

	public static int checkPassword(String passwordStr) {
		String regexZ = "\\d*";
		String regexLS = "[a-z]+";
		String regexUS = "[A-Z]+";
		String regexS = "[a-zA-Z]+";
		String regexT = "\\W+$";
		String regexZT = "\\D*";
		String regexST = "[\\d\\W]*";
		String regexZS = "\\w*";
		String regexZST = "[\\w\\W]*";

		if (passwordStr.length() < 6) {
			return -1;
		}

		if (passwordStr.matches(regexZ) || passwordStr.matches(regexLS) || passwordStr.matches(regexUS)
				|| passwordStr.matches(regexT)) {
			return -1;
		}
		if (passwordStr.matches(regexS) || passwordStr.matches(regexZT) || passwordStr.matches(regexST)
				|| passwordStr.matches(regexZS)) {
			return 0;
		}

		if (passwordStr.matches(regexZST)) {
			return 1;
		}
		return -1;

	}

}
